#ifndef TOMATO_H
#define TOMATO_H

#include <QWidget>
#include <QPaintEvent>
#include <QCloseEvent>
#include <QContextMenuEvent>
#include <QSystemTrayIcon>
#include <QMenu>
#include <QAction>

#include "TimeCounter.h"

namespace Ui {
class Tomato;
}

class Tomato : public QWidget
{
    Q_OBJECT

    unsigned int angle;
    unsigned int target;

    unsigned RELAX = 60*5;
    unsigned WORK = 60*25;


    enum {R, W};
    unsigned status = R;

public:
    explicit Tomato(QWidget *parent = nullptr);
    ~Tomato();

    TimeCounter time_count;

    void Draw();

    void SetDefault(unsigned int rt, unsigned int wt);

protected:
    void paintEvent(QPaintEvent * event) override;

private:
    Ui::Tomato *ui;

    void closeEvent(QCloseEvent* event);

private slots:
    void skip();
};

#endif // TOMATO_H
